#ifndef __CXHGT_PLAYER_EVENT_H__
#define __CXHGT_PLAYER_EVENT_H__

#include "Expand/Events.h"

using namespace PocketSurvival;

namespace PocketSurvival
{
    class SubsystemTerrain;
    class SubsystemPlayers;
};

namespace CXHGT
{
    class ChestLock;

    class PlayerEvent : public IPlayerEvent, public IInventoryEvent, public IInventoryOpenEvent
    {
    private:
        ChestLock *m_chestLock;

        SubsystemTerrain *m_subsystemTerrain;
        SubsystemPlayers *m_subsystemPlayers;

    public:
        PlayerEvent(ChestLock * chestLock);
        virtual bool playerPlaceBlock(ComponentPlayer *componentPlayer, const Point3 &point, int32_t placeBlockValue) override;
        virtual bool playerBreakBlock(ComponentPlayer *componentPlayer, const Point3 &point, int32_t digBlockValue, int32_t toolLevel) override;

        virtual bool openPointInventory(std::shared_ptr<PlayerData> playerData, const Point3 &point, IInventory *inventory) override;
        virtual bool playerHandleMoveItem(std::shared_ptr<PlayerData> playerData, IInventory *sourceInventory, uint32_t sourceSlotIndex, IInventory *targetInventory, int32_t targetSlotIndex, uint32_t count) override;
        virtual bool playerHandleDragDrop(std::shared_ptr<PlayerData> playerData, IInventory *sourceInventory, uint32_t sourceSlotIndex, DragMode dragMode, IInventory *targetInventory, uint32_t targetSlotIndex, bool processingOnly) override;
        virtual bool playerDrapDrop(ComponentPlayer *componentPlayer, const Vector3 &dropVelocity, IInventory *inventory, uint32_t slotIndex, uint32_t count) override;
    };

} // namespace BedWars

#endif
